package com.admin.system.service;

import com.admin.model.base.PageResult;
import com.admin.model.dto.UserDto;
import com.admin.model.pojo.Menu;
import com.admin.model.pojo.Role;
import com.admin.model.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Set;

/**
 * (User)表服务接口
 *
 * @author makejava
 * @since 2021-01-31 19:19:30
 */
public interface UserService extends IService<User> {

    void resetPasswordById(Long id);

    PageResult queryByDeptId(Long deptId,int pageNum,int pageSize,String orderBy);

    PageResult queryAll(UserDto userDto, int pageNum, int pageSize, String orderBy);

    UserDto queryById(Long id);

    void create(UserDto userDto);


    void deleteByIds(Set<Long> ids);

    void updateById(UserDto userDto);

    void authRoles(Long userId, List<Long> roleIds);

    void authDepts(Long userId, List<Long> deptIds);

    void authJobs(Long userId, List<Long> jobIds);

    //List<Role> queryRolesByUserId(Long userId);

    List<Menu> queryMenusByUserIdAndTypeNot(Long userId, int type);
}